package com.bajiao.entity.pay;

import lombok.Data;

import java.util.Date;

@Data
public class PayQrResult {
    /**
     * 订单编号
     */
    private String orderNo;
    /**
     * 订单id
     */
    private String orderId;
    /**
     * 支付的金额
     */
    private double payMoney;
    /**
     * 付款编号
     */
    private String paymentNo;
    /**
     * 二维码
     */
    private String qr;
    /**
     * 过期时间戳
     */
    private Date expiredTime;


    public static final class PayQrResultBuilder {
        private String orderNo;
        private String orderId;
        private double payMoney;
        private String paymentNo;
        private String qr;
        private Date expiredTime;

        private PayQrResultBuilder() {
        }

        public static PayQrResultBuilder aPayQrResult() {
            return new PayQrResultBuilder();
        }

        public PayQrResultBuilder orderNo(String orderNo) {
            this.orderNo = orderNo;
            return this;
        }

        public PayQrResultBuilder orderId(String orderId) {
            this.orderId = orderId;
            return this;
        }

        public PayQrResultBuilder payMoney(double payMoney) {
            this.payMoney = payMoney;
            return this;
        }

        public PayQrResultBuilder paymentNo(String paymentNo) {
            this.paymentNo = paymentNo;
            return this;
        }

        public PayQrResultBuilder qr(String qr) {
            this.qr = qr;
            return this;
        }

        public PayQrResultBuilder expiredTime(Date expiredTime) {
            this.expiredTime = expiredTime;
            return this;
        }

        public PayQrResult build() {
            PayQrResult payQrResult = new PayQrResult();
            payQrResult.setOrderNo(orderNo);
            payQrResult.setOrderId(orderId);
            payQrResult.setPayMoney(payMoney);
            payQrResult.setPaymentNo(paymentNo);
            payQrResult.setQr(qr);
            payQrResult.setExpiredTime(expiredTime);
            return payQrResult;
        }
    }
}
